package day02;

import java.util.ArrayList;

import static day02.GMethodTest.max;
import static day02.GMethodTest.removeDuplicates;

public class test{
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<Integer>();
        ArrayList<Circle>  circles = new ArrayList<Circle>();

        list.add(14);
        list.add(24);
        list.add(14);
        list.add(12);

        circles.add(new Circle(3));
        circles.add(new Circle(2.9));
        circles.add(new Circle(5.9));
        circles.add(new Circle(3));

        ArrayList<Integer>  newList = removeDuplicates(list);
        ArrayList<Circle>  newcircles = removeDuplicates(circles);

        //观察下面三行代码打印结果，是否去掉了ArrayList中的重复项
        System.out.println(newList);  //是否去掉一个相同的“14”
        System.out.println(newcircles); //是否去掉一个半径为3的圆

        Integer[] numbers = {1, 2, 3};
        System.out.println(max(numbers));
        Circle[]   c = {new Circle(3), new Circle(2.9), new Circle(5.9)};
        System.out.println(max(c));
    }

}